#pragma once
#include <QtGui/qdialog.h>
#include <QtGui/QLineEdit>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QPainter>

#include <OWCommon/Common.h>
class CHouseSizeDialog:
	public QDialog
{
	Q_OBJECT;
public:
	CHouseSizeDialog(QWidget* p = NULL);
	~CHouseSizeDialog(void);
	static bool getSize(QWidget* p, float& length, float& width, float& height, QString& str);
	bool getSize(float& length, float& width, float& height);
	inline QString getNmae(){return m_pName->text(); }
	inline bool isOK(){return m_isOK; }
private slots:
	void ok();
	//void cancel();
private:
	void initWindow();
private:
	QLineEdit* m_pName;
	QLineEdit* m_pLength;
	QLineEdit* m_pWidth;
	QLineEdit* m_pHeight;
	bool m_isOK;
};

class CColorWidget:public QWidget
{
public:
	CColorWidget(QWidget*);
	virtual ~CColorWidget();
	void mouseReleaseEvent(QMouseEvent *);
	void paintEvent(QPaintEvent *);
private:
	QImage* m_backImg;
	QRgb m_rgb;
};

class CMaterialAttribute:public QDialog
{
public:
	CMaterialAttribute(QWidget*);
	virtual ~CMaterialAttribute();
	void paintEvent(QPaintEvent *);
private:
	QImage* m_image;
};